home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Shareware World / Comms & Internet / LinkConverter 1.1.2 / Dialog Director v0.7 / Examples / Menu.as < prev    next >
Encoding:
Text File  |  1998-01-12  |  754 b   |  16 lines  |  [TEXT/ToyS]

  1. on run
  2.     set d to current date
  3.     set dd to d's date string
  4.     DoMenu(["One", "Two", "Three", "Four", 5, 6, 7, 8, 9, 10, 11, 12, 13 ¬
  5.         , d's time string, word 1 of dd, third word of dd, last word of dd])
  6. end run
  7.  
  8. on DoMenu(theOptions) -- theItems is a list of up to 20 strings
  9.     set [_ok, _cancel, _choice] to dd auto dialog {size:[260, 295], contents:[¬
  10.         {class:push button, bounds:[190, 265, 250, 285], name:"OK"}, ¬
  11.         {class:push button, bounds:[110, 265, 170, 285], name:"Cancel"}, ¬
  12.         {class:radio group, bounds:[20, 40, 120, 56], button offset:[105, 20], max down:10, contents:theOptions}, ¬
  13.         {class:static text, bounds:[10, 10, 250, 26], contents:"Choose an option:"} ¬
  14.             ], timeout after:60}
  15.     if _ok then return theOptions's item _choice
  16. end DoMenu